using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter10
{
	/// <summary>
	/// Example06: Uniform Rigid Rod
	/// Calculate the moment of inertia of a uniform rigid rod 
	/// of length  L and mass (Fig.10.10) about an axis 
	/// perpendicular to the rod and passing through its center 
	/// of mass.
	/// I_y = 1/12 M L^2
	/// </summary>
	public class Example06
	{
		public Example06()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Mass m = new L.Mass();
			m.kg = 10.0;
			L.RigidBody rod = new L.RigidBody(m);
			L.Length l = new L.Length();
			l.m = 5.0;
			rod.SetRodAboutCenter(l);
			L.MomentOfInertia I = rod.RigidBodyMomentOfInertia;
			result+=Convert.ToString(I.YY);      
		}
	}
}
